package com.itheima.control;

import com.itheima.domain.Book;
import com.itheima.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author tongchen
 * @create 2022-12-20 20:26
 */
@RestController
@RequestMapping("/books")
public class BookControl {
    @Autowired
    IBookService bookService;
    @PostMapping()
    public boolean save(@RequestBody Book book){
        return bookService.save(book);
    }
}
